package com.kirk.cts.core.runcycle.support;


import com.kirk.cts.core.runcycle.schedule.ScheduleEnum;
import com.kirk.cts.core.runcycle.schedule.processor.IRunScheduleProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;
import java.util.TreeSet;


/**
 * <p> RunSchedule.java </p>
 *
 * @version 1.0.0
 * @Author kirkliu
 * @Date 2020-08-30 16:31
 * @Description 运行中计划
 */
@Component("runSchedule")
public class RunSchedule extends AbstractSchedule<IRunScheduleProcessor> {

    @Autowired
    private List<IRunScheduleProcessor> runScheduleProcessor;

    @Override
    public ScheduleEnum getSchedule() {
        return ScheduleEnum.RUN;
    }

    @Override
    protected Collection<IRunScheduleProcessor> getScheduleProcessors() {
        return new TreeSet<IRunScheduleProcessor>(this.runScheduleProcessor);
    }

    public void setRunScheduleProcessor(List<IRunScheduleProcessor> runScheduleProcessor) {
        this.runScheduleProcessor = runScheduleProcessor;
    }


}
